package com.imc.beans;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TbCorpnoteId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbCorpnoteId implements java.io.Serializable {

	// Fields

	private String corpId;
	private String noteDepart;
	private String noteSender;
	private Date noteSendtime;
	private String noteRecmobile;
	private String noteContent;
	private Integer type;
	private double oper;

	// Constructors

	/** default constructor */
	public TbCorpnoteId() {
	}

	/** minimal constructor */
	public TbCorpnoteId(String corpId, String noteSender, Date noteSendtime,
			String noteRecmobile, Integer type, double oper) {
		this.corpId = corpId;
		this.noteSender = noteSender;
		this.noteSendtime = noteSendtime;
		this.noteRecmobile = noteRecmobile;
		this.type = type;
		this.oper = oper;
	}

	/** full constructor */
	public TbCorpnoteId(String corpId, String noteDepart, String noteSender,
			Date noteSendtime, String noteRecmobile, String noteContent,
			Integer type, double oper) {
		this.corpId = corpId;
		this.noteDepart = noteDepart;
		this.noteSender = noteSender;
		this.noteSendtime = noteSendtime;
		this.noteRecmobile = noteRecmobile;
		this.noteContent = noteContent;
		this.type = type;
		this.oper = oper;
	}

	// Property accessors

	@Column(name = "corp_id", nullable = false, length = 50)
	public String getCorpId() {
		return this.corpId;
	}

	public void setCorpId(String corpId) {
		this.corpId = corpId;
	}

	@Column(name = "note_depart", length = 100)
	public String getNoteDepart() {
		return this.noteDepart;
	}

	public void setNoteDepart(String noteDepart) {
		this.noteDepart = noteDepart;
	}

	@Column(name = "note_sender", nullable = false, length = 50)
	public String getNoteSender() {
		return this.noteSender;
	}

	public void setNoteSender(String noteSender) {
		this.noteSender = noteSender;
	}

	@Column(name = "note_sendtime", nullable = false, length = 19)
	public Date getNoteSendtime() {
		return this.noteSendtime;
	}

	public void setNoteSendtime(Date noteSendtime) {
		this.noteSendtime = noteSendtime;
	}

	@Column(name = "note_recmobile", nullable = false, length = 30)
	public String getNoteRecmobile() {
		return this.noteRecmobile;
	}

	public void setNoteRecmobile(String noteRecmobile) {
		this.noteRecmobile = noteRecmobile;
	}

	@Column(name = "note_content", length = 200)
	public String getNoteContent() {
		return this.noteContent;
	}

	public void setNoteContent(String noteContent) {
		this.noteContent = noteContent;
	}

	@Column(name = "type", nullable = false)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "oper", nullable = false, precision = 22, scale = 0)
	public double getOper() {
		return this.oper;
	}

	public void setOper(double oper) {
		this.oper = oper;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbCorpnoteId))
			return false;
		TbCorpnoteId castOther = (TbCorpnoteId) other;

		return ((this.getCorpId() == castOther.getCorpId()) || (this
				.getCorpId() != null && castOther.getCorpId() != null && this
				.getCorpId().equals(castOther.getCorpId())))
				&& ((this.getNoteDepart() == castOther.getNoteDepart()) || (this
						.getNoteDepart() != null
						&& castOther.getNoteDepart() != null && this
						.getNoteDepart().equals(castOther.getNoteDepart())))
				&& ((this.getNoteSender() == castOther.getNoteSender()) || (this
						.getNoteSender() != null
						&& castOther.getNoteSender() != null && this
						.getNoteSender().equals(castOther.getNoteSender())))
				&& ((this.getNoteSendtime() == castOther.getNoteSendtime()) || (this
						.getNoteSendtime() != null
						&& castOther.getNoteSendtime() != null && this
						.getNoteSendtime().equals(castOther.getNoteSendtime())))
				&& ((this.getNoteRecmobile() == castOther.getNoteRecmobile()) || (this
						.getNoteRecmobile() != null
						&& castOther.getNoteRecmobile() != null && this
						.getNoteRecmobile()
						.equals(castOther.getNoteRecmobile())))
				&& ((this.getNoteContent() == castOther.getNoteContent()) || (this
						.getNoteContent() != null
						&& castOther.getNoteContent() != null && this
						.getNoteContent().equals(castOther.getNoteContent())))
				&& ((this.getType() == castOther.getType()) || (this.getType() != null
						&& castOther.getType() != null && this.getType()
						.equals(castOther.getType())))
				&& (this.getOper() == castOther.getOper());
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCorpId() == null ? 0 : this.getCorpId().hashCode());
		result = 37
				* result
				+ (getNoteDepart() == null ? 0 : this.getNoteDepart()
						.hashCode());
		result = 37
				* result
				+ (getNoteSender() == null ? 0 : this.getNoteSender()
						.hashCode());
		result = 37
				* result
				+ (getNoteSendtime() == null ? 0 : this.getNoteSendtime()
						.hashCode());
		result = 37
				* result
				+ (getNoteRecmobile() == null ? 0 : this.getNoteRecmobile()
						.hashCode());
		result = 37
				* result
				+ (getNoteContent() == null ? 0 : this.getNoteContent()
						.hashCode());
		result = 37 * result
				+ (getType() == null ? 0 : this.getType().hashCode());
		result = 37 * result + (int) this.getOper();
		return result;
	}

}